import request from '@/utils/request'

// 查询购买房产列表
export function listBuyHouse(query) {
  return request({
    url: '/house_sale/BuyHouse/list',
    method: 'get',
    params: query
  })
}

// 查询购买房产列表
export function listBuyHouse1(query) {
  return request({
    url: '/house_sale/BuyHouse/list1',
    method: 'get',
    params: query
  })
}

// 查询购买房产详细
export function getBuyHouse(buyid) {
  return request({
    url: '/house_sale/BuyHouse/' + buyid,
    method: 'get'
  })
}

// 新增购买房产
export function addBuyHouse(data) {
  return request({
    url: '/house_sale/BuyHouse',
    method: 'post',
    data: data
  })
}

// 修改购买房产
export function updateBuyHouse(data) {
  return request({
    url: '/house_sale/BuyHouse',
    method: 'put',
    data: data
  })
}

// 删除购买房产
export function delBuyHouse(buyid) {
  return request({
    url: '/house_sale/BuyHouse/' + buyid,
    method: 'delete'
  })
}

// 退房
export function checkout(data) {
  return request({
    url: '/house_sale/BuyHouse/checkout',
    method: 'post',
    data: data
  })
}

// 换房
export function change(data) {
  return request({
    url: '/house_sale/BuyHouse/change',
    method: 'post',
    data: data
  })
}

// 付款方案列表
export function paidschemelist(query) {
  return request({
    url: '/house_sale/BuyHouse/paidschemelist',
    method: 'get',
    params: query
  })
}

